// 系统概览数据类型
export interface SystemOverview {
  userCount: number;
  materialCount: number;
  categoryCount: number;
  trippingRecordCount: number;
  lowStockCount: number;
  pendingTrippingCount: number;
}

// 物资库存概况类型
export interface MaterialOverview {
  normal: number;
  lowStock: number;
  needReplenish: number;
  scrapped: number;
}

// 用户角色分布类型
export interface UserRoleDistribution {
  role: string;
  count: number;
}

// 用户活跃度数据类型
export interface UserActivity {
  dailyActive: number;
  weeklyActive: number;
  monthlyActive: number;
  userRoleDistribution: UserRoleDistribution[];
}

// 物资分类占比类型
export interface MaterialCategoryRatio {
  categoryName: string;
  count: number;
  percentage: number;
}

// 物资库存趋势类型
export interface MaterialInventoryTrendItem {
  timePoint: string;
  totalStock: number;
  inboundQuantity: number;
  outboundQuantity: number;
  netChange: number;
}

export interface MaterialInventoryTrend {
  trendData: MaterialInventoryTrendItem[];
  period: string;
  totalChange: number;
  totalInbound: number;
  totalOutbound: number;
}

// 物资使用频率排行类型
export interface MaterialUsageRanking {
  materialName: string;
  usageCount: number;
  categoryName: string;
}

// 库存预警物资类型
export interface LowStockMaterial {
  id: number;
  materialName: string;
  categoryName: string;
  quantity: number;
  minQuantity: number;
  unit: string;
  shortage: number;
}

// 跳闸记录统计类型
export interface TrippingStats {
  totalCount: number;
  handledCount: number;
  pendingCount: number;
  averagePower: number;
  maxPower: number;
  timeDistribution: {
    morning: number;
    afternoon: number;
    evening: number;
  };
}

// 跳闸功率分布类型
export interface TrippingPowerDistribution {
  range: string;
  count: number;
}

// 跳闸时间分布项类型
export interface TrippingTimeDistributionItem {
  timePoint: string;
  count: number;
}

// 跳闸时间分布类型
export interface TrippingTimeDistribution {
  type: string;
  distribution: TrippingTimeDistributionItem[];
}

// 班级跳闸排行类型
export interface ClassTrippingRanking {
  className: string;
  count: number;
  counselor: string;
}

// 用户登录时间分布项类型
export interface UserLoginTimeDistributionItem {
  date: string;
  count: number;
}

// 用户登录统计类型
export interface UserLoginStats {
  totalLogins: number;
  uniqueUsers: number;
  averageLoginsPerUser: number;
  timeDistribution: UserLoginTimeDistributionItem[];
}

// 用户操作分布类型
export interface UserOperationDistribution {
  operation: string;
  count: number;
  percentage: number;
}

// API响应类型
export interface ApiResponse<T> {
  result: string;
  message: string;
  data: T;
}